<extend name="_Layout/main"/>

<block name="var">
    "current_version": "{:C('CURRENT_VERSION')}",
    "check_version_url": "{:U('Admin/SystemUpdate/checkVersion')}",
    "index_url": "{:U('Index/index')}",
    "user_reg_date": {:$user_reg_date},
    "user_reg_count": {:$user_reg_count}
</block>

<block name="libs">
    <script src="__PUBLIC__/libs/chart/1.x/Chart.min.js"></script>
</block>

<block name="container">
    <div class="container">
        <div id="dashboard">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="panel-actions"></div>
                            <i class="fa fa-home"></i> 关于thinkshop
                        </div>
                        <div class="panel-body">
                            <p class="text-indent">{:C('PRODUCT_INFO')}</p>
                            <p class="text-indent">{:C('COMPANY_INFO')}</p>
                        </div>
                    </div>
                </div>

                <div class="col-xs-12 col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="update pull-right"></div>
                            <i class="fa fa-cog"></i> 系统信息
                        </div>
                        <div class="panel-body">
                            <table class="table table-condensed text-overflow">
                                <tbody>
                                    <tr>
                                        <td>thinkshop版本</td>
                                        <td>v{:C('CURRENT_VERSION')}</td>
                                    </tr>
                                    <tr>
                                        <td>ThinkPHP版本</td>
                                        <td>{$Think.VERSION}</td>
                                    </tr>
                                    <tr>
                                        <td>服务器操作系统</td>
                                        <td>{$Think.const.PHP_OS}</td>
                                    </tr>
                                    <tr>
                                        <td>运行环境</td>
                                        <td>
                                            <?php
                                                $server_software = explode(' ', $_SERVER['SERVER_SOFTWARE']);
                                                echo $server_software[0];
                                            ?>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>PHP版本</td>
                                        <td><?php echo PHP_VERSION; ?></td>
                                    </tr>
                                    <tr>
                                        <td>MYSQL版本</td>
                                        <td><php>$system_info_mysql = M()->query("select version() as v;");</php>{$system_info_mysql.0.v}</td>
                                    </tr>
                                    <tr>
                                        <td>上传限制</td>
                                        <td>{:ini_get('upload_max_filesize')}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <div class="col-xs-12 col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="panel-actions"></div>
                            <i class="fa fa-th-list"></i> 产品团队
                        </div>
                        <div class="panel-body">
                            <table class="table table-condensed">
                                <tbody>
                                    <tr>
                                        <td>网站标题</td>
                                        <td>{:C('WEB_SITE_TITLE')}</td>
                                    </tr>
                                    <tr>
                                        <td>项目开发团队</td>
                                        <td>{:C('DEVELOP_TEAM')}</td>
                                    </tr>
                                    <tr>
                                        <td>thinkshop框架</td>
                                        <td><a href="{:C('WEBSITE_DOMAIN')}">{:C('COMPANY_NAME')}</a></td>
                                    </tr>
                                    <tr>
                                        <td>官方网址</td>
                                        <td><a href="{:C('WEBSITE_DOMAIN')}">{:C('WEBSITE_DOMAIN')}</a></td>
                                    </tr>
                                    <tr>
                                        <td>产品团队</td>
                                        <td>吴强</td>
                                    </tr>
                                    <tr>
                                        <td>官方QQ群</td>
                                        <td>
                                            <a target="_blank" href="/">
                                            开通中
                                            </a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>联系我们</td>
                                        <td>
                                            <span>
                                                <a href="/"><i class="fa fa-envelope"></i></a>
                                            </span>
                                            <span>
                                                <a href="#" tabindex="0" role="button" data-toggle="popover" data-trigger="hover" data-placement="bottom"
                                                    title="QQ联系" data-html="true" data-content="<div style='width:120px;'><ul class='list-unstyled'><li>技术：997720994</li><li>销售：997720994</li><li>市场：997720994</li></ul></div>">
                                                    <i class="fa fa-qq"></i>
                                                </a>
                                            </span>
                                            <span>
                                                <a href="#" data-html="true" tabindex="0" role="button" data-toggle="popover" data-trigger="hover" data-placement="bottom"
                                                    data-template='<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content" style="padding:0px;width:200px;"></div></div>'
                                                    title="微信扫一扫" data-html="true" data-content="开通中">
                                                    <i class="fa fa-weixin"></i>
                                                </a>
                                            </span>
                                            <span>
                                                <a target="_blank" href="/"><i class="fa fa-weibo"></i></a>
                                            </span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>


        <div class="chart">
            <div class="row">

                <div class="col-xs-12 col-sm-6 col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="pull-right">
                                <button id="daterange_set" class="btn btn-default btn-sm" style="margin-top:-5px;margin-right:-5px;"><span class="fa fa-cog"></span></button>
                            </div>
                            <i class="fa fa-area-chart"></i> 用户增长统计
                        </div>
                        <div class="panel-body">
                            <h5 class="text-center">{$start_date}－{$end_date} {$count_day}天用户增长</h5>
                            <canvas id="mychart" style="width:100%;height:300px;"></canvas>
                        </div>
                    </div>
                </div>

            </div>
        </div>


        <div class="footer text-muted">
            <span>版权所有 © 2014-<php>echo date("Y",time());</php></span>
            <a href="{:C('WEBSITE_DOMAIN')}" class="text-muted" target="_blank">{:C('PRODUCT_NAME')} v{:C('CURRENT_VERSION')}</a>
            <a href="{:C('WEBSITE_DOMAIN')}" class="text-muted" target="_blank">{:C('COMPANY_NAME')}</a> 
            <a class="text-muted pull-right">项目开发团队：{:C('DEVELOP_TEAM')}</a>
        </div>
    </div>
</block>
